package net.khoroshev.wschat.web.exception;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;

/**
 * Created with IntelliJ IDEA.
 * User: vfirstov
 * Date: 18.11.13
 * Time: 21:57
 *
 */

@ResponseStatus(value= HttpStatus.NOT_FOUND, reason="Page not found")
public class NotFoundException extends RuntimeException {


//    And here is a controller method using it:
//
//
//    @RequestMapping(value="/orders/{id}", method=GET)
//    public String showOrder(@PathVariable("id") long id, Model model) {
//        Order order = orderRepository.findOrderById(id);
//        if (order == null) throw new OrderNotFoundException(id);
//        model.addAttribute(order);
//        return "orderDetail";
//    }


}
